﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Odbc;
using System.Data;

namespace LectorHuellaC
{
    class cls_category
    {
        log4net.ILog logger;
        ConectaBD conBD = new ConectaBD();

        OdbcCommand cm;
        OdbcParameter prm;
        OdbcDataReader dr;

        public cls_category()
        {
            log4net.Config.XmlConfigurator.Configure();
            logger = log4net.LogManager.GetLogger(typeof(Program));
        }

        public DataTable getCategories()
        {
            string product_info = "call getCategories()";
            conBD.ConectaODBC();
            cm = new OdbcCommand();
            cm.Connection = conBD.ConexionODBC;
            cm.CommandType = CommandType.StoredProcedure;
            cm.CommandText = product_info;
            DataTable table = new DataTable();
            OdbcDataAdapter da = new OdbcDataAdapter(cm);
            da.Fill(table);
            return table;
        }

    }
}
